Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

diff: add unit tests for copy tracking in the git backend #4092

Merged
merged 1 commit into from
Jul 15, 2024

Conversation

fowles
Copy link
Collaborator

@fowles fowles commented Jul 15, 2024

Checklist

If applicable:

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, demos/)
  • I have updated the config schema (cli/src/config-schema.json)
  • I have added tests to cover my changes

@fowles fowles enabled auto-merge (rebase) July 15, 2024 18:47
@fowles fowles merged commit df02108 into jj-vcs:main Jul 15, 2024
17 checks passed
@fowles fowles deleted the tests branch July 15, 2024 20:49
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Since this is specific to the git backend, I think this should go in test_git_backend.rs. Could you move it there?

lib/tests/test_copy_tracking.rs Show resolved Hide resolved
}

#[test]
fn test_git_detection() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to have tests with more than one file in each commit to show that we detect the right copies. It would also be good to have tests where the contents don't match exactly.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about this, but at some point we are just testing the implementation of gix. Given that all logic for quality of comparison resides there, I would rather not.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants